package com.dalao.root.system.controller;

import com.dalao.root.system.entity.Result;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.List;

@Controller
@RequestMapping("system")
public class SystemController {

    @RequestMapping(value = "blank")
    public String blank() {
        return "blank";
    }

    @RequestMapping(value = "error")
    public String errorPage(HttpServletRequest request) {
        Result result = (Result) request.getAttribute("result");
        return result.getResult();
    }

    @RequestMapping(value = "view/{page}")
    public String view(@PathVariable String page) {
        return page;
    }
}
